import logging,HTMLTestRunner_cn
import time




class Tools:
    def Log(self):
        tm=time.strftime("%Y_%m_%d %H_%M_%S")
        log=logging.basicConfig(level=logging.INFO,
                                format='%(filename)s %(levelname)s %(asctime)s %(message)s %(lineno)d',
                                filename=f'pyt_+{tm}+.log',
                                filemode='a+')
        return log
    def Report(self):
        report1 = HTMLTestRunner_cn.HTMLTestRunner(
            open(r'C:\Users\Administrator\PyCharmMiscProject\ppppp\TestReport.html', 'wb'),
            title='测试报告',
            description='测试报告'
        )
        return report1



